package cn.bughub.controller;

import cn.bughub.model.vo.login.UserNameLoginRequestVo;
import cn.bughub.model.vo.login.UserNameLoginResponseVo;
import cn.bughub.util.ResultResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 身份验证控制器
 *
 * @author zwj
 * @date 2024-09-23 16:54
 */
@RestController
@RequestMapping("/auth")
public class AuthController {
    
    /**
     * 用户名登录
     *
     * @param userNameLoginRequestVo 用户名登录请求实体
     * @return {@link ResultResponse }
     */
    @PostMapping("/login")
    public ResultResponse<UserNameLoginResponseVo> login(UserNameLoginRequestVo userNameLoginRequestVo) {
        UserNameLoginResponseVo vo = new UserNameLoginResponseVo();
        vo.setAccessToken("token");
        return ResultResponse.success(vo);
    }
}
